package com.woniu.command.purchasecommand;


import com.woniu.command.Command;
import com.woniu.command.handle.PurchaseCommandHandle;
import com.woniu.uitl.ApplicationContextHolder;

public class DeletePurchaseCommand implements Command<Long,String> {

    private PurchaseCommandHandle handle;

    public DeletePurchaseCommand() {
        this.handle = ApplicationContextHolder.getApplicationContext().getBean(PurchaseCommandHandle.class);
    }

    @Override
    public String excute(Long id) {
        String msg = handle.delete(id);
        return msg;
    }
}
